package com.dlc.shop.delivery.common.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dlc.shop.bean.vo.OutletConfigInfoVO;
import com.dlc.shop.delivery.common.model.OutletConfig;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 网点配置
 * @author TRACK
 */
public interface OutletConfigMapper extends BaseMapper<OutletConfig> {
    /**
     * 检查网点配置是否重复
     * @param outletConfig
     * @return
     */
    int checkIsExist(@Param("outletConfig") OutletConfig outletConfig);

    /**
     * 取消默认
     * @param shopId
     */
    void cancelDefault(@Param("shopId") Long shopId);

    /**
     * 设为/取消默认
     * @param outletConfigId
     */
    void setDefault(@Param("outletConfigId") Long outletConfigId);

    /**
     * 获取店铺网点配置列表
     * @param shopId
     * @return
     */
    List<OutletConfigInfoVO> listByShopId(@Param("shopId") Long shopId);
}
